<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/operationsinfo/operations_contract/q_operations_contract.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/operationsinfo/operations_contract/q_operations_contract.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Operations_contract',
                footer: "Foots",
                cnName: '运维合同',
                name: 'operations_contract/q_operations_contract',
                url: "/q_operations_contract/",
                sortName: "Voucher_sub"
            });
            const editFormFields = ref({"Voucher_sub":"","Client_name":"","Site":"","Client_man":"","Client_tel":"","Total_price":"","Goods_num":"","Province":"","City":"","District":"","Client_addr":"","StartTime":"","EndTime":"","Remark":"","Attachment":"","Image":""});
            const editFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"text"},
                               {"dataKey":"审核通过客户","data":[],"title":"客户名称","required":true,"field":"Client_name","colSize":6,"type":"select"},
                               {"title":"站点名称","required":true,"field":"Site"}],
                              [{"title":"联系人","field":"Client_man","type":"text"},
                               {"title":"电话","field":"Client_tel","type":"text"},
                               {"title":"总价","field":"Total_price","type":"text"},
                               {"title":"数量","field":"Goods_num","type":"text"}],
                              [{"dataKey":"省","data":[],"title":"省","required":true,"field":"Province","type":"select"},
                               {"dataKey":"省","data":[],"title":"市","required":true,"field":"City","type":"select"},
                               {"dataKey":"省","data":[],"title":"区","required":true,"field":"District","type":"select"},
                               {"title":"地址","field":"Client_addr","type":"text"}],
                              [{"title":"开始日期","required":true,"field":"StartTime","type":"datetime"},
                               {"title":"结束日期","required":true,"field":"EndTime","type":"datetime"},
                               {"title":"备注","field":"Remark","colSize":6,"type":"textarea"}],
                              [{"title":"图片","field":"Image","type":"img"},
                               {"title":"附件","field":"Attachment","type":"file"}]]);
            const searchFormFields = ref({"Voucher_sub":"","Client_name":"","Site":"","state":"","StartTime":"","EndTime":"","AuditStatus":""});
            const searchFormOptions = ref([[{"title":"单据编码","field":"Voucher_sub","type":"like"},{"dataKey":"审核通过客户","data":[],"title":"客户名称","field":"Client_name","type":"select"},{"title":"站点名称","field":"Site","type":"like"},{"dataKey":"合同期限状态","data":[],"title":"合同状态","field":"state","type":"select"}],[{"title":"开始日期","field":"StartTime","type":"datetime"},{"title":"结束日期","field":"EndTime","type":"datetime"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"}]]);
            const columns = ref([{field:'Voucher_sub',title:'单据编码',type:'string',link:true,width:120,align:'left',sort:true},
                       {field:'Client_name',title:'客户名称',type:'string',bind:{ key:'审核通过客户',data:[]},width:110,require:true,align:'left'},
                       {field:'Site',title:'站点名称',type:'string',width:220,require:true,align:'left'},
                       {field:'Client_man',title:'联系人',type:'string',width:120,align:'left'},
                       {field:'Client_tel',title:'电话',type:'string',width:110,align:'left'},
                       {field:'Province',title:'省',type:'string',bind:{ key:'省',data:[]},width:120,require:true,align:'left'},
                       {field:'City',title:'市',type:'string',bind:{ key:'省',data:[]},width:120,require:true,align:'left'},
                       {field:'District',title:'区',type:'string',bind:{ key:'省',data:[]},width:120,require:true,align:'left'},
                       {field:'Client_addr',title:'地址',type:'string',width:110,align:'left'},
                       {field:'Total_price',title:'总价',type:'decimal',width:110,align:'left'},
                       {field:'Goods_num',title:'数量',type:'float',width:110,align:'left'},
                       {field:'state',title:'合同状态',type:'int',bind:{ key:'合同期限状态',data:[]},width:80,align:'left'},
                       {field:'StartTime',title:'开始日期',type:'datetime',width:155,require:true,align:'left',sort:true},
                       {field:'EndTime',title:'结束日期',type:'datetime',width:155,require:true,align:'left',sort:true},
                       {field:'Attachment',title:'附件',type:'file',width:110,align:'left'},
                       {field:'Image',title:'图片',type:'img',width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:155,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Operations_contract',title:'ID',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "运维合同明细",
                table: "q_operations_contractList",
                columns: [{field:'Operations_contractList',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Operations_contract',title:'父级ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'Brand',title:'设备品牌',type:'string',width:220,edit:{type:'text'},require:true,align:'left',sort:true},
                       {field:'Type',title:'设备类型',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'Model',title:'设备型号',type:'string',width:110,edit:{type:'text'},align:'left'},
                       {field:'Price',title:'价格',type:'decimal',width:110,edit:{type:'number'},align:'left'},
                       {field:'Goods_num',title:'数量',type:'float',width:110,edit:{type:'number'},require:true,align:'left'}],
                sortName: "Brand",
                key: "Operations_contractList"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
